#ifndef JPASSWDLINEEDIT_H
#define JPASSWDLINEEDIT_H

#include <QTEGui/QTEGuiGlobal>
#include <QLineEdit>

namespace QTE
{

class JPasswdLineEditPrivate;

// 密码编辑框
class QTEGUI_EXPORT JPasswdLineEdit : public QLineEdit
{
	Q_OBJECT

public:
	explicit JPasswdLineEdit(QWidget *parent = nullptr);
	~JPasswdLineEdit();

public:
	bool allowViewPasswd() const;
	bool passwdVisible() const;

public Q_SLOTS:
    void setEchoMode(QLineEdit::EchoMode mode);
	void setPasswdVisible(bool visible);
	void setAllowViewPasswd(bool allow = true);

protected:
	bool event(QEvent *event) override;

private:
	Q_DISABLE_COPY(JPasswdLineEdit)
	JPasswdLineEditPrivate *d_ptr;
};

} //namespace QTE


#endif //JPASSWDLINEEDIT_H
